// pages/dt/dt.js
Page({

  data: {
    arr1: [],
    isShow: false,
    url: "../image/dt/dianzan.png",
    iShow: true,

  },
  //点赞
  zan: function (res) {
    console.log(res)
    let url
    if (res.currentTarget.dataset.msg == "../image/dt/dianzan.png") {
      url = "../image/dt/dianzan1.png"
    } else {
      url = "../image/dt/dianzan.png"
    }
    this.setData({
      url: url
    })

  },
zan:function(){
  
},
  onLoad: function (options) {
    //根据前一个页面所点的id；把内容传过来
    var app = getApp()
    var movieid = app.MovieDetailid;
    // console.log(app.requestDetailid)
    var that = this;
    const eventChannel = this.getOpenerEventChannel()
    // 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
    eventChannel.on('acceptDataFromOpenerPage', function (data) {
      that.setData({
        arr1: data
      })
      // console.log(data)
    }),
      //获取屏幕宽高
      wx.getSystemInfo({
        success: function (res) {
          console.log(res)
          that.setData({
            screenWidth: res.screenWidth,
            screenHeight: res.screenHeight
          })
        }
      })
  },
})